function isPC() {
  var userAgentInfo = navigator.userAgent;
  var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
  var flag = true;
  for (var v = 0; v < Agents.length; v++) {
    if (userAgentInfo.indexOf(Agents[v]) > -1) {
      flag = false;
      break;
    }
  }
  return flag;
}

$(function () {

  // 飘窗相关
  if (document.getElementById("pc1")) {
    if (!isPC()) {
      $("#pc1").hide();
    }
    if ($("#pc1")) {
      var ad1 = new AdMove("pc1", "close_btn");
      ad1.Run();
    }
    // 判断飘窗是否有
    $("#pc1").find("span").text() == "1" ? $("#pc1").show() : $("#pc1").hide();
  }


  function initSwiper01() {
      if (Swiper) {
      var swiperOption01 = {
        autoplay: 4000,
        loop: true,
        autoplayDisableOnInteraction: true,
        pagination: '.swiper-container-01 .pagination',
        paginationClickable: true
      };
      var swiper01 = new Swiper('.swiper-container-01', swiperOption01);
      $('.arrow-left-01').on('click', function (e) {
        e.preventDefault()
        swiper01.swipePrev()
      })
      $('.arrow-right-01').on('click', function (e) {
        e.preventDefault()
        swiper01.swipeNext()
      })
    }
  }
 
    initSwiper01();

  function initSwiper03() {
    if (Swiper) {
      var swiperOption03 = {
        autoplay: 3000,
        loop: true,
        autoplayDisableOnInteraction: true,
        pagination: '.swiper-container-03 .pagination',
        paginationClickable: true
      };
      var swiper03 = new Swiper('.swiper-container-03', swiperOption03);
    }
  }
  initSwiper03();

})
